home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / EXPR11.ARJ / EXPR.H < prev    next >
C/C++ Source or Header  |  1992-02-26  |  921b  |  44 lines

  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <math.h>
  4. #include <alloc.h>
  5.  
  6. typedef struct Factor {
  7.    char operator;
  8.    char toktyp;
  9.    double value;
  10.    struct Term *Expr;
  11.    struct Factor *Arg;
  12.    struct Factor *Power;
  13.    struct Factor *next;
  14. } Factor;
  15.  
  16. typedef struct Term {
  17.    char operator;
  18.    struct Factor *FactorList;
  19.    struct Term *next;
  20. } Term;
  21.  
  22. typedef struct Expr {
  23.    char *vars;
  24.    int numvars;
  25.    struct Term *TermList;
  26. } Expr;
  27.  
  28. extern Expr *ParseExpr(char *, int, char *);
  29. extern Expr *DiffExpr(Expr *, char);
  30. extern Expr *CopyExpr(Expr *);
  31. extern void SimpExpr(Expr *);
  32.  
  33. extern double EvalExpr(Expr *, double *);
  34. extern void FreeExpr(Expr *);
  35.  
  36. extern Expr *AddExpr(Expr *, Expr *);
  37. extern Expr *SubExpr(Expr *, Expr *);
  38. extern Expr *DivExpr(Expr *, Expr *);
  39. extern Expr *MultExpr(Expr *, Expr *);
  40.  
  41. extern char *UnParseExpr(Expr *);
  42.  
  43. extern char Expr_errstr[];
  44.